Read from params[] in Rails
Posted
by Adnan
on Stack Overflow
See other posts from Stack Overflow
or by Adnan
Published on 2010-03-15T12:01:15Z
Indexed on
2010/03/15
12:09 UTC
Read the original article
Hit count: 237
ruby-on-rails
Hi,
I use:
<%= select( "payment", "id", { "Visa" => "1", "Mastercard" => "2"}) %>
and I get this in HTML
<select id="payment_id" name="payment[id]"><option value="2">Mastercard</option>
<option value="1">Visa</option></select>
now how can I read the payment[id]
with params[]
, if I use params[payment[id]] I get an error.
© Stack Overflow or respective owner